<template>
  <div class="param-info" v-if="Object.keys(paramInfo).length !==0">
    <table v-for="(table,index) in paramInfo.sizes"
           class="info-size" :key="index">
      <tr v-for="(tr,indey) in table" :key="indey">
        <td v-for="(td,indez) in tr" :key="indez">{{td}}</td>
      </tr>
    </table>

    <table class="info-param">
      <tr v-for="(info,index) in paramInfo.infos" :key="index">
        <td class="info-param-key">{{info.key}}</td>
        <td class="info-param-value">{{info.value}}</td>

      </tr>
    </table>

    <div class="info-img" v-if="paramInfo.image.length !==0"></div>
      <img :src="paramInfo.image" alt="">
  </div>
</template>

<script>
  export default {
    name: "DetailGoodsParam",
    props:{
      paramInfo:{
        type:Object,
        default(){
          return{}
        }
      }
    }
  }
</script>

<style scoped>
  .param-info{
    padding: 10px 0;
    font-size: 14px;
    border-bottom: 5px solid #f2f5f8;
  }
  table{
    width: 100%;
    margin-left: 10px;
  }
  table tr{
    height: 42px;
  }
  td{
    border-bottom: 1px solid #ebe9e9;
  }
  .table td:nth-child(1){
    width: 80px;
  }
  .info-param{
    font-size: 12px;
  }

  .info-param-key{
    width: 80px;
  }
  .info-param-value{
    color: var(--color-height-text);
  }
</style>
